package com.example.shengyin.service;


import com.example.shengyin.entity.Article;
import com.example.shengyin.entity.ArticleSimple;
import com.example.shengyin.entity.Job;
import com.example.shengyin.entity.Page;
import org.apache.ibatis.annotations.Param;

import java.sql.Timestamp;
import java.util.List;

public interface ArticleService {


    Article selectById(@Param("id") Long id);

    int insert(Article article);

    int update(Article article);

    int deleteById(@Param("id") Integer id);

    int deleteByIds(@Param("ids") String ids);

    List<Article> articleList(Page page, @Param("type") String type, @Param("typecode") String typecode,
                              @Param("createby") String createby, @Param("start") Timestamp start, @Param("end") Timestamp end);

    List<ArticleSimple> articleList2(Page page, @Param("type") String type, @Param("typecode") String typecode,
                                     @Param("createby") String createby, @Param("start") Timestamp start, @Param("end") Timestamp end);
    int countTotall(@Param("type") String type, @Param("typecode") String typecode,
                    @Param("createby") String createby, @Param("start") Timestamp start, @Param("end") Timestamp end);

    List<ArticleSimple> selecthot(@Param("number")int number);

    List<ArticleSimple> selectnewwest(@Param("number")int number);

    List<ArticleSimple> selectrecomend(@Param("number")int number);

    List<ArticleSimple> articleList3(Page page, @Param("type") String type, @Param("typecode") String typecode,
                                     @Param("createby") String createby, @Param("start") Timestamp start, @Param("end") Timestamp end);


    List<ArticleSimple> Eventshot(@Param("number")int number);

    List<ArticleSimple> Eventsnewwest(@Param("number")int number);

    List<ArticleSimple> Eventsrecomend(@Param("number")int number);


    List<Article> selectByNmae(@Param("name") String name,@Param("type") String type,@Param("typecode") String typecode);
}
